package cm.cool.web.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cm.cool.web.bean.UserDto;
import cm.cool.web.data.UserMapper;
import cm.cool.web.util.respon.R;
import cm.cool.web.util.respon.ResultEncoding;

@Service
public class UserService {

	@Autowired
	private UserMapper userMapper;

	public R getLastTime(UserDto user) {
		
		R r = new R();
		try {
			int count = userMapper.getLastTime(user.getLastTime());
			r.setData(count);
		} catch (Exception e) {
			e.printStackTrace();
			r.setCode(ResultEncoding.R_ERR);
			r.setMsg("查询异常");
			return r;
		}
		return r;
	}
}
